package com.wing.product.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description="上机记录表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_computer_practice")
public class WarehouseComputerPractice extends BaseEntity<WarehouseComputerPractice> {

    @TableField(value = "computer_practice_code")
    @Schema(description="上机记录编号")
    private String computerPracticeCode;

    @TableField(value = "production_plan_id")
    @Schema(description="生产计划id")
    private Long productionPlanId;

    @TableField(value = "production_plan_code")
    @Schema(description="生产计划编号")
    private String productionPlanCode;

    @TableField(value = "production_scheduling_plan_detail_id")
    @Schema(description="制令单id")
    private Long productionSchedulingPlanDetailId;

    @TableField(value = "production_scheduling_plan_detail_code")
    @Schema(description="制令单编号")
    private String productionSchedulingPlanDetailCode;

    @TableField(value = "production_order_id")
    @Schema(description="所属生产订单id")
    private Long productionOrderId;

    @TableField(value = "production_order_number")
    @Schema(description="所属生产订单编号")
    private String productionOrderNumber;

    @TableField(value = "product_id")
    @Schema(description="生产产品id")
    private Long productId;

    @TableField(value = "customer_product_code")
    @Schema(description="生产客户产品料号")
    private String customerProductCode;

    @TableField(value = "material_number")
    @Schema(description="领料料号数")
    private String materialNumber;

    @TableField(value = "requisition_quantity")
    @Schema(description="领料数量")
    private BigDecimal requisitionQuantity;

    @TableField(value = "production_line_id")
    @Schema(description="生产线id")
    private Long productionLineId;

    @TableField(value = "workshop_id")
    @Schema(description="工位id")
    private Long workshopId;

    @TableField(value = "status")
    @Schema(description="状态1.待报工，2.已报工")
    private String status;

    @TableField(value = "warehouse_material_number")
    @Schema(description="领料出库数量")
    private Integer warehouseMaterialNumber;

    @TableField(value = "warehouse_id")
    @Schema(description="仓库id")
    private Long warehouseId;

    @TableField(value = "material_requisition_record_id")
    @Schema(description="领料记录id")
    private Long materialRequisitionRecordId;

    @TableField(value = "planned_quantity")
    @Schema(description="计划产量")
    private BigDecimal plannedQuantity;

    @TableField(value = "planned_production_time")
    @Schema(description="计划生产时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plannedProductionTime;

    @TableField(value = "planned_delivery_time")
    @Schema(description="计划交货时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime plannedDeliveryTime;
}
